package cn.com.bob.library.mapper;

import cn.com.bob.library.entity.Book;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.mybatis.spring.annotation.MapperScan;

/**
* @author 12948
* @description 针对表【book】的数据库操作Mapper
* @createDate 2023-06-30 08:27:12
* @Entity cn.com.bob.library.entity.Book
*/

public interface BookMapper extends BaseMapper<Book> {


    @Override
    @Insert("CALL InsertBook(#{bookId}, #{title}, #{author}, #{isbn}, #{publisher}, #{stock}, #{publishedTime}, #{addedTime}, #{categoryId}, #{deletedTime}, #{description}, #{version})")
    int insert(Book entity);


    @Update("CALL UpdateBook (#{bookId}, #{title}, #{author}, #{isbn}, #{publisher}, #{stock}, #{publishedTime}, #{categoryId}, #{description}, #{version})")
    int updateBook(Book entity);
}




